# Copyright 2023 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

ASR_SAMPLE_RATE = 16000

# hyperparameters when num_left_chunks = 10
FEATURE_DIM = 80
NUM_LAYERS = 12
NUM_HEADS = 8
REQUIRED_CACHE_SIZE = 160
OUTPUT_DIM = 128
CNN_MODULE_KERNEL = 14
OUTPUT_SIZE = 512

# streaming encoder config
DECODING_CHUNK_SIZE = 16
CONTEXT = 7
SUBSAMPLING = 4
DECODING_WINDOW = (DECODING_CHUNK_SIZE - 1) * SUBSAMPLING + CONTEXT

# decoding config
NUM_BEAM_SEARCH_PROCESSES = 1
IGNORE_ID = -1
BLANK_ID = 0
BEAM_SIZE = 10
SPACE_ID = -2

# decoder input limit
MAX_CHUNKS = 16
MAX_SEQ_LEN = 256
MAX_HYPS = 64
